import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            component: resolve => require(['../components/common/Main.vue'],resolve)
        },
        {
            path: '/home',
            component: resolve => require(['../components/common/Home.vue'],resolve),
            children: [
                {
                    path: '/',
                    component: resolve => require(['../components/page/Welcome.vue'],resolve)
                },
                {
                    path: '/basetable',
                    component: resolve => require(['../components/page/Basetable.vue'], resolve)
                },
                {
                    path: '/demo01',
                    component: resolve => require(['../components/demo/Demo01.vue'], resolve)
                },
                {
                    path: '/demo02',
                    component: resolve => require(['../components/demo/Demo02.vue'], resolve)
                },
                {
                    path: '/imgUpload',
                    component: resolve => require(['../components/demo/ImgUpload.vue'], resolve)
                },
                {
                    path: '/ueditor1',
                    component: resolve => require(['../components/demo/Ueditor1.vue'], resolve)
                },
                {
                    path: '/editor2',
                    component: resolve => require(['../components/demo/Html5Editor.vue'], resolve)
                }
            ]
        }
    ]
})
